Skip to content

fix(mcp): refresh complete catalogs and discover active tools - #198

Merged
ZouR-Ma merged 2 commits into
mainfrom
fix/mcp-catalog-discovery
Sep 28, 2026
Merged

ZouR-Ma merged 2 commits into
mainfrom
fix/mcp-catalog-discovery

Conversation

@MelodyVAR

Copy link
Copy Markdown
Collaborator

MCP startup registered only the first catalog page, and find_tools searched a captured built-in list. Collect complete catalogs, refresh filtered additions/updates/removals in one extension-owned batch, and search the active session catalog with callable parameter schemas.

Preserve input schemas and bind output validation/task policy to each captured tool definition, avoiding SDK 1.27.1's mutable per-page metadata cache. Failed refreshes retain the last good catalog; shutdown and one-shot handshake cancellation close outstanding work. The SDK version is unchanged. Related to the closed #154 pagination proposal.

Validation:

  • Real local HTTP/SSE MCP and session-registry regressions passed, including pagination, schema changes during pending calls, overlays, shutdown and stalled initialized handshakes.
  • npm run check
  • pnpm run build:offline
  • ./test.sh with isolated credentials

MelodyVAR and others added 2 commits September 27, 2026 17:44
The non-strict Anthropic tool path keeps only `properties` and `required`,
so a schema whose properties point at root `$defs` or `definitions` (as
pydantic-based MCP servers emit for enums and nested models) was sent with
dangling `$ref`s. MCP input schemas now reach the provider unchanged, so
carry those local definitions along with the kept properties.
@ZouR-Ma
ZouR-Ma merged commit 71c6f04 into main Sep 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants